<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Simulator Environment</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="edit68k.css" rel="stylesheet" type="text/css">
<style>
<!--
td { font-family: Verdana, Arial, Helvetica, sans-serif }
.bodyline	{ background-color: #FFFFFF; border: 1px #98AAB1 solid; }

.forumline	{ background-color: #FFFFFF; border: 2px #006699 solid; }

td.row1	{ background-color: #EFFFEF; }
.postbody { font-size : 12px; line-height: 18px}
-->
</style>
</head>

<body class="text">
<p class="heading">Sim68K Environment<hr noshade></p>
<p></p>
<p>TRAP #15 is used for I/O. &nbsp;Put the task number in D0.</p>
<b>&nbsp;Task</b>
<table border="1" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="697">
  <tr>
    <td class="text">
	<p><b>&nbsp;30</b></td>
    <td class="text">
	<p> &nbsp;Clear 
	the Cycle Counter</td>
  </tr>
  <tr>
    <td class="text">
	<p><b>&nbsp;31</b></td>
    <td class="text">
        <p> &nbsp;Return 
	the Cycle Counter in D1.L&nbsp; Zero is returned if the cycle count exceeds 
		32 bits.</td>
  </tr>
	<tr>
    <td width="6%" class="text">
	<p><b>&nbsp;32</b></td>
    <td width="94%" class="text">
        <p> 
		&nbsp;Hardware/Simulator<br>
&nbsp;&nbsp; D1.B = 00, Display hardware window<br>
&nbsp;&nbsp; D1.B = 01, Return address of 7-segment display in D1.L<br>
&nbsp;&nbsp; D1.B = 02, Return address of LEDs in D1.L<br>
&nbsp;&nbsp; D1.B = 03, Return address of toggle switches in D1.L<br>
		&nbsp;&nbsp; D1.B = 04, Return Sim68K version number in D1.L<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		Version 3.9.10 is returned as 0003090A<br>
&nbsp;&nbsp; D1.B = 05, Enable exception processing. <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		Exceptions will be directed to the appropriate 68000 exception vector.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		This has the same effect as checking Enable Exceptions in the
		<a href="SIMHELP/SimOptions.htm">Options</a> menu.<br>
&nbsp;&nbsp; D1.B = 06, Set Auto IRQ<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		D2.B = 00, disable all Auto IRQs<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		or&nbsp;&nbsp;&nbsp;&nbsp; Bit 7 = 0, disable individual IRQ<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		Bit 7 = 1, enable individual IRQ<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		Bits 6-0, IRQ number 1 through 7<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		D3.L, Auto Interval in milliseconds, 1000 = 1 second <br>
&nbsp;&nbsp; D1.B = 07, Return address of push button switches in D1.L</td>
  </tr>
	<tr>
    <td width="6%" class="text">
	<p><b>&nbsp;33</b></td>
    <td width="94%" class="text">
        <p> 
		&nbsp;Get/Set Output Window<br>
&nbsp;&nbsp; D1.L High 16 bits = Set width in pixels, min = 640<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Low 16 bits&nbsp; = 
		Set height in pixels, min = 480&nbsp;&nbsp;
		<br>
&nbsp;&nbsp; D1.L = 0, Get current output window resolution in D1.L as<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; High 16 bits = 
		Width in pixels<br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		Low 16 bits&nbsp; = Height in pixels<br>
&nbsp;&nbsp; D1.L = 1, Set windowed mode<br>
&nbsp;&nbsp; D1.L = 2, Set full screen mode&nbsp;
	    <br>
		<br>
		Example:<p class="sourcecode" style="margin-top: 0; margin-bottom: 0"> 
		<font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp; MOVE.B #33,D0<br>
		&nbsp;&nbsp;&nbsp;&nbsp; MOVE.L 
		#1024*$10000+768,D1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set screen 
		to 1024 x 768<br>
		&nbsp;&nbsp;&nbsp;&nbsp; TRAP&nbsp;&nbsp; #15</font></td>
  </tr>
  </table>
  </body>
</html>
